package com.cn.designpatterns.ex.concrete.observer.simple;

/**
 * 具体的观察者实现类
 *
 * @author zhangyi
 * @date 2018/12/24 17:28
 */
public class ConcreteObserver extends Observer {

    public ConcreteObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("this is concrete Observer"+this.subject.getState());
    }
}
